<div class="stripe">
  <h1>Machine: <%= @machine.name %></h1>

  <%= form_for(@changeset, machine_path(@conn, :edit, @machine.id), fn f -> %>
  <label for="machine_name" class="<%= if f.errors[:name], do: "has-error" %>">Name (required)</label>

    <div class="input">
      <%= text_input(f, :name, required: true) %>
      <%= if message = f.errors[:name] do %>
        <p class="help-block"><%= translate_error(message) %></p>
      <% end %>
    </div>

    <div class="submit"><%= submit("Edit machine", class: "btn btn-primary") %></div>
  <% end) %>

  <p>
    <a class="btn btn-default" href="<%= machine_path(@conn, :list) %>">&laquo; Back to machine list</a>
  </p>
</div>
